# 8X AI Image Upscaler -API Integration
Image super-resolution algorithms can compensate for some lost image data, thereby obtaining images that are clearer and more realistic than the original images.
# Task Creation
Create an algorithm task based on the input parameters and return the task id
# Request Address
/v3/pic/fsrtwo/batch
# Request Parameter
Method
post
Header
Field | Required | Type | Value | Description |
---|---|---|---|---|
Content-Type | YES | string | application/json | |
Authorization | YES | string | Basic xxxxxxxxx | Basic base64 (appkey:appsecret) created by users combining appkey and secret |
Body
Field | Required | Type | Value | Description |
---|---|---|---|---|
images | YES | string[] | Up to 20 images awaiting processing (Downloadable image file link) | |
file_ext | YES | string | Return image format: Limited to: JPG, PNG | |
priority | YES | integer | Priority, range [0,9] |
Sample Code
{
"images": [
"Downloadable image file link",
"Downloadable image file link"
],
"file_ext": "png",
"priority": 1
}
# Input File Restriction
Image Format | Image File Size | Image Resolution | Image Aspect Ratio |
---|---|---|---|
PNG JPG JPEG BMP | No more than 50 MB | Greater than 256x256px, less than 1k | Aspect ratio within 4:1 |
# Return Data
Body
Field | Son Field | Required | Type | Value | Description |
---|---|---|---|---|---|
code | - | YES | number | Status Code | |
msg | - | YES | string | Request Information | |
data | - | YES | object | Response Data | |
- | task_id | YES | string | Task id |
Sample Code
{
"code": 0,
"msg": "",
"data": {
"task_id": "6a4eab77-be30-430a-bf0e-3048042a34ef"
}
}
# Result Acquisition
Request task processing result based on task id
# Request Address
/v3/pic/fsrtwo/result/{task_id}
# Request Parameter
Method
get
Header
Field | Required | Type | Value | Description |
---|---|---|---|---|
Content-Type | YES | string | application/json | |
Authorization | YES | string | Basic xxxxxxxxx | Basic base64 (appkey:appsecret) created by users combining appkey and secret |
Path Parameter
Field | Son Field | Required | Type | Value | Description |
---|---|---|---|---|---|
task_id | - | YES | string | Task id |
# Return Data
Body
Field | Son Field | Grandson Field | Required | Type | Value | Description |
---|---|---|---|---|---|---|
code | - | - | YES | number | Status Code | |
msg | - | - | YES | string | Request Information | |
data | - | - | YES | object | Response Data | |
- | status | - | YES | string | Task Status: 1- Waiting; 2 - In progress; 3 - Task complete; 4 - Task failure; 5 - Task closed; 6 - Task timed out | |
- | wait_time | - | YES | string | The waiting time before the next request, with unit of s | |
- | list | - | YES | object[] | Result list | |
- | - | image_result | YES | string | Processed image URL | |
- | - | status | YES | string | Process Status | |
- | - | reason | YES | string | Cause of failure |